package com.foreverwin.mes.so.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.activerecord.Model;

import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * <p>
 * 工单派工主表
 * </p>
 *
 * @author Syngna
 * @since 2020-02-06
 */
@TableName("Z_SHOP_ORDER_DISPATCH")
public class ShopOrderDispatch extends Model<ShopOrderDispatch> {

    private static final long serialVersionUID = 1L;

   @TableId(value = "HANDLE", type = IdType.INPUT)
   private String handle;
    /**
     * 站点
     */
   @TableField("SITE")
   private String site;
    /**
     * 工单编号
     */
   @TableField("SHOP_ORDER")
   private String shopOrder;
    /**
     * 物料HANDLE
     */
   @TableField("ITEM_BO")
   private String itemBo;
    /**
     * 设备
     */
   @TableField("RESRCE")
   private String resrce;
   /**
    * 拆分原则
    */
   @TableField("SPLIT_PRINCIPLE")
   private String splitPrinciple;
    /**
     * 设备批量
     */
   @TableField("RESRCE_BATCH")
   private BigDecimal resrceBatch;
    /**
     * CT时间
     */
   @TableField("CYCLE_TIME")
   private BigDecimal cycleTime;
    /**
     * 理论产能（班次）
     */
   @TableField("THEORY_CAPACITY")
   private String theoryCapacity;
    /**
     * 本次派工数量
     */
   @TableField("DISP_QTY")
   private BigDecimal dispQty;
    /**
     * 本次派工开始日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
   @TableField("DISP_START_DATE")
   private Date dispStartDate;
    /**
     * 本次派工完成日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
   @TableField("DISP_COMP_DATE")
   private Date dispCompDate;
    /**
     * 派工时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
   @TableField("DISP_DATE")
   private Date dispDate;
    /**
     * 派工任务号
     */
   @TableField("DISP_TASK_NO")
   private String dispTaskNo;
    /**
     * 更新人
     */
   @TableField("CREATOR")
   private String creator;
   @TableField("UPDATER")
   private String updater;
    /**
     * 创建日期
     */
   @TableField("CREATED_DATE_TIME")
   private Date createdDateTime;
    /**
     * 更新日期
     */
   @TableField("MODIFIED_DATE_TIME")
   private Date modifiedDateTime;

   @TableField(exist = false)
   private String item;

   @TableField(exist = false)
   private String itemDescription;

   @TableField(exist = false)
   private String resourceDescription;

   /**
    * 工单数量
    */
   @TableField(exist = false)
   private String qtyToBuild;

   /**
    * 待派工数量
    */
   @TableField(exist = false)
   private String toDispQty;

   /**
    * 物料基本单位
    */
   @TableField(exist = false)
   private String unitOfMeasure;

   /**
    * 工单计划完成日期
    */
   @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
   @TableField(exist = false)
   private Date plannedCompDate;

   @TableField(exist = false)
   private String globalQuery;

   @TableField(exist = false)
   private String workShopSection;

   @TableField(exist = false)
   private List<ShopOrderDispatchDetail> shopOrderDispatchDetailList;

   public String getHandle() {
      return handle;
   }

   public void setHandle(String handle) {
      this.handle = handle;
   }

   public String getSite() {
      return site;
   }

   public void setSite(String site) {
      this.site = site;
   }

   public String getShopOrder() {
      return shopOrder;
   }

   public void setShopOrder(String shopOrder) {
      this.shopOrder = shopOrder;
   }

   public String getItemBo() {
      return itemBo;
   }

   public void setItemBo(String itemBo) {
      this.itemBo = itemBo;
   }

   public String getResrce() {
      return resrce;
   }

   public void setResrce(String resrce) {
      this.resrce = resrce;
   }

   public String getSplitPrinciple() {
      return splitPrinciple;
   }

   public void setSplitPrinciple(String splitPrinciple) {
      this.splitPrinciple = splitPrinciple;
   }

   public BigDecimal getResrceBatch() {
      return resrceBatch;
   }

   public void setResrceBatch(BigDecimal resrceBatch) {
      this.resrceBatch = resrceBatch;
   }

   public BigDecimal getCycleTime() {
      return cycleTime;
   }

   public void setCycleTime(BigDecimal cycleTime) {
      this.cycleTime = cycleTime;
   }

   public String getTheoryCapacity() {
      return theoryCapacity;
   }

   public void setTheoryCapacity(String theoryCapacity) {
      this.theoryCapacity = theoryCapacity;
   }

   public BigDecimal getDispQty() {
      return dispQty;
   }

   public void setDispQty(BigDecimal dispQty) {
      this.dispQty = dispQty;
   }

   public Date getDispStartDate() {
      return dispStartDate;
   }

   public void setDispStartDate(Date dispStartDate) {
      this.dispStartDate = dispStartDate;
   }

   public Date getDispCompDate() {
      return dispCompDate;
   }

   public void setDispCompDate(Date dispCompDate) {
      this.dispCompDate = dispCompDate;
   }

   public Date getDispDate() {
      return dispDate;
   }

   public void setDispDate(Date dispDate) {
      this.dispDate = dispDate;
   }

   public String getDispTaskNo() {
      return dispTaskNo;
   }

   public void setDispTaskNo(String dispTaskNo) {
      this.dispTaskNo = dispTaskNo;
   }

   public String getCreator() {
      return creator;
   }

   public void setCreator(String creator) {
      this.creator = creator;
   }

   public String getUpdater() {
      return updater;
   }

   public void setUpdater(String updater) {
      this.updater = updater;
   }

   public Date getCreatedDateTime() {
      return createdDateTime;
   }

   public void setCreatedDateTime(Date createdDateTime) {
      this.createdDateTime = createdDateTime;
   }

   public Date getModifiedDateTime() {
      return modifiedDateTime;
   }

   public void setModifiedDateTime(Date modifiedDateTime) {
      this.modifiedDateTime = modifiedDateTime;
   }

   public String getItem() {
      return item;
   }

   public void setItem(String item) {
      this.item = item;
   }

   public String getItemDescription() {
      return itemDescription;
   }

   public void setItemDescription(String itemDescription) {
      this.itemDescription = itemDescription;
   }

   public String getResourceDescription() {
      return resourceDescription;
   }

   public void setResourceDescription(String resourceDescription) {
      this.resourceDescription = resourceDescription;
   }

   public String getQtyToBuild() {
      return qtyToBuild;
   }

   public void setQtyToBuild(String qtyToBuild) {
      this.qtyToBuild = qtyToBuild;
   }

   public String getToDispQty() {
      return toDispQty;
   }

   public void setToDispQty(String toDispQty) {
      this.toDispQty = toDispQty;
   }

   public String getUnitOfMeasure() {
      return unitOfMeasure;
   }

   public void setUnitOfMeasure(String unitOfMeasure) {
      this.unitOfMeasure = unitOfMeasure;
   }

   public Date getPlannedCompDate() {
      return plannedCompDate;
   }

   public void setPlannedCompDate(Date plannedCompDate) {
      this.plannedCompDate = plannedCompDate;
   }

   public String getGlobalQuery() {
      return globalQuery;
   }

   public void setGlobalQuery(String globalQuery) {
      this.globalQuery = globalQuery;
   }

   public String getWorkShopSection() {
      return workShopSection;
   }

   public void setWorkShopSection(String workShopSection) {
      this.workShopSection = workShopSection;
   }

   public List<ShopOrderDispatchDetail> getShopOrderDispatchDetailList() {
      return shopOrderDispatchDetailList;
   }

   public void setShopOrderDispatchDetailList(List<ShopOrderDispatchDetail> shopOrderDispatchDetailList) {
      this.shopOrderDispatchDetailList = shopOrderDispatchDetailList;
   }

   public static final String HANDLE = "HANDLE";

   public static final String SITE = "SITE";

   public static final String SHOP_ORDER = "SHOP_ORDER";

   public static final String ITEM_BO = "ITEM_BO";

   public static final String RESRCE = "RESRCE";

   public static final String RESRCE_BATCH = "RESRCE_BATCH";

   public static final String CYCLE_TIME = "CYCLE_TIME";

   public static final String THEORY_CAPACITY = "THEORY_CAPACITY";

   public static final String DISP_QTY = "DISP_QTY";

   public static final String DISP_START_DATE = "DISP_START_DATE";

   public static final String DISP_COMP_DATE = "DISP_COMP_DATE";

   public static final String DISP_DATE = "DISP_DATE";

   public static final String DISP_TASK_NO = "DISP_TASK_NO";

   public static final String CREATOR = "CREATOR";

   public static final String UPDATER = "UPDATER";

   public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";

   public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";

   @Override
   protected Serializable pkVal() {
      return this.handle;
   }

   @Override
   public String toString() {
      return "ShopOrderDispatch{" +
         "handle = " + handle +
         ", site = " + site +
         ", shopOrder = " + shopOrder +
         ", itemBo = " + itemBo +
         ", resrce = " + resrce +
         ", resrceBatch = " + resrceBatch +
         ", cycleTime = " + cycleTime +
         ", theoryCapacity = " + theoryCapacity +
         ", dispQty = " + dispQty +
         ", dispStartDate = " + dispStartDate +
         ", dispCompDate = " + dispCompDate +
         ", dispDate = " + dispDate +
         ", dispTaskNo = " + dispTaskNo +
         ", creator = " + creator +
         ", updater = " + updater +
         ", createdDateTime = " + createdDateTime +
         ", modifiedDateTime = " + modifiedDateTime +
         "}";
   }
}